import { createHashRouter, Navigate } from "react-router";
import Info from "../pages/Home/Info/index.router";
import Concant from "../pages/Concant/index.router";

const routes = [
  {
    path: "/",
    children: [
      {
        index: true,
        path: "/",
        element: <Navigate to="/home" />,
      },
      {
        path: "/concant",
        element: <Concant />,
      },
      {
        path: "/home",
        children: [
          {
            index: true,
            path: "/home",
            element: <Navigate to="/home/info" />,
          },
          {
            path: "/home/info",
            element: <Info />,
            handle: {
              name: "info",
            },
          },
        ],
      },
    ],
  },
];

export default createHashRouter(routes);
